package com.xiaoshuidi.cloud.module.member.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.member.pojo.user.MemberOmnipotentPassword;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface MemberOmnipotentPasswordMapper extends BaseMapperX<MemberOmnipotentPassword> {

    default MemberOmnipotentPassword getByOrganization(String organization) {
        return this.selectOne(new LambdaQueryWrapper<MemberOmnipotentPassword>().eq(MemberOmnipotentPassword::getOrganization, organization));
    }

    default void updatePassword(MemberOmnipotentPassword update) {
        this.updateById(update);
    }
}
